package main

import "fmt"

func main() {
	//for1()
	//for2()
	//deadFor()
	arrayFor()
}

func for1() {
	for i := 0; i < 10; i++ {
		fmt.Println(i)
	}
}

func for2() {
	i := 0
	for i < 10 {
		fmt.Println(i)
		i++
	}
}

func deadFor() {
	for {
		fmt.Println("死循环进行中...")
	}
}

func arrayFor() {
	arr := [3]int{1, 3, 5}
	for i, v := range arr {
		fmt.Println(i, v)
	}
}
